
#include <iostream>
class IService {
	 public:
    		virtual void execute() = 0;
	 };

	class ConcreteService : public IService {
	public:
    	void execute() override {
        	std::cout << "ConcreteService::execute" << std::endl;
    	}
	};

class Client {
private:
    IService* service;

public:
    Client() : service(nullptr) {}

    void setService(IService* svc) {
        service = svc;
    }

    void doSomething() {
        if (service) {
            service->execute();
        }
    }
};

int main() {
    ConcreteService service;
    Client client;
    client.setService(&service);
    client.doSomething();

    return 0;
}